// 位运算，限制：长度小于32，无法对子集去重
int** subsets(int* nums, int numsSize, int* returnSize, int** returnColumnSizes){
    int N = 1<<numsSize;
    int**res = malloc(sizeof(int *) * N);
    *returnColumnSizes = malloc(sizeof(int) * N);
    res[0] = NULL;
    (*returnColumnSizes)[0] = 0;

    int cnt = 1, select, pos;
    int i, temp[numsSize];
    for (int bitmap = 1; bitmap < N; bitmap++) {
        select = 0; pos = 0; 
        for (i = 0; i < numsSize; i++) {
            if (bitmap & (1<<i)) {  
                temp[pos++] = nums[i];
                select++;
            }
        }
        res[cnt] = malloc(sizeof(int) * select);
        (*returnColumnSizes)[cnt] = select;
        for (i = 0; i < select; i++) {
            res[cnt][i] = temp[i];
        }
        cnt++;
    }
    *returnSize = N;
    return res;
}